
import { _decorator, Component, Node } from 'cc';
import { App } from './Framework/Core/App';
const { ccclass, property } = _decorator;

/**
 * Predefined variables
 * Name = Main
 * DateTime = Wed Oct 20 2021 15:39:40 GMT+0800 (中国标准时间)
 * Author = abc123zou123
 * FileBasename = Main.ts
 * FileBasenameNoExtension = Main
 * URL = db://assets/Script/Main.ts
 * ManualUrl = https://docs.cocos.com/creator/3.3/manual/zh/
 *
 */
 
@ccclass('Main')
export class Main extends Component {
    // [1]
    // dummy = '';

    // [2]
    // @property
    // serializableDummy = 0;

    public app:App;

    public onLoad()
    {
        this.app = new App();
        App.Instance = this.app;
        this.app.onLoad();
    }

    start () {
        // [3]
        this.app.start();
    }

    update (deltaTime: number) {
        // [4]
        this.app.update(deltaTime);
    }
}

/**
 * [1] Class member could be defined like this.
 * [2] Use `property` decorator if your want the member to be serializable.
 * [3] Your initialization goes here.
 * [4] Your update function goes here.
 *
 * Learn more about scripting: https://docs.cocos.com/creator/3.3/manual/zh/scripting/
 * Learn more about CCClass: https://docs.cocos.com/creator/3.3/manual/zh/scripting/ccclass.html
 * Learn more about life-cycle callbacks: https://docs.cocos.com/creator/3.3/manual/zh/scripting/life-cycle-callbacks.html
 */
